package cn.wolfcode.p2p.base.domain;

import lombok.Getter;
import lombok.Setter;

import java.util.Date;

@Setter@Getter
public class BaseAuditDomain extends BaseDomain {
    public static final Integer STATE_NORMAL = 0; //待审核
    public static final Integer STATE_SUCCESS = 1; //审核成功
    public static final Integer STATE_REJECT = 2; //审核失败

    protected Integer state = STATE_NORMAL; //审核状态
    protected String remark;//审核备注
    protected LoginInfo auditor; //审核人
    protected LoginInfo applier; //申请人
    protected Date applyTime;//申请时间
    protected Date auditTime;//审核时间

    public String getStateDisplay() {
        if (state == STATE_NORMAL) {
            return "待审核";
        } else if (state == STATE_SUCCESS) {
            return "审核成功";
        } else if (state == STATE_REJECT) {
            return "审核失败";
        } else {
            return "状态异常";
        }

    }
}
